Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEA] Create ListSeries from JS Arrays, add ListSeries.getValue() #187

Merged
merged 5 commits into from
May 11, 2021

Conversation

trxcllnt
Copy link
Collaborator

Now that cudf::get_element supports list_scalar, we can add ListSeries.getValue().

  • Support creating ListSeries from Arrays of JS Arrays
  • Move getValue and setValue to the Series subclasses to make the types happy
  • Implement ListSeries.getValue()

let bigintsCount = 0;
let booleansCount = 0;
let unknownCount = 0;
value.forEach((val) => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much more efficient, since it only loops over the values once!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

couldn't this just short-circuit and throw immediately in case of an unknown type? Then the logic below could also be slightly simplified (no need to check unknownCount)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bryevdv yes I believe it could!

@trxcllnt trxcllnt merged commit c9360dd into rapidsai:main May 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants